﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="allprofiles.aspx.vb" Inherits="felixfinalproject2.allprofiles" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
    <asp:ListView ID="ListView1" runat="server" DataKeyNames="dinerid" 
        DataSourceID="SqlDataSource1" GroupItemCount="3">
        <AlternatingItemTemplate>
            <td runat="server" style="background-color:#ffffff; color :black; ">
              
                       
             <center><a href='profile.aspx?dinerid=<%# Eval("dinerid") %>'>
             <img src='<%# Eval("portrait") %>' alt="profile picture" style="width:200px;height:150px; margin:auto;"/></a></center><br/>
                <%# Eval("firstname") %> <%# Eval("lastname") %>
                <br />
                dateofbirth:
                <asp:Label ID="dateofbirthLabel" runat="server" 
                    Text='<%# Eval("dateofbirth") %>' />
                <br />
                registrationdate:
                <asp:Label ID="registrationdateLabel" runat="server" 
                    Text='<%# Eval("registrationdate") %>' />
                <br />
                gender:
                <asp:Label ID="genderLabel" runat="server" Text='<%# Eval("gender") %>' />
                <br />
            </td>
        </AlternatingItemTemplate>
        <EditItemTemplate>
            <td runat="server" style="background-color:#008A8C;color: #FFFFFF;">
                dinerid:
                <asp:Label ID="dineridLabel1" runat="server" Text='<%# Eval("dinerid") %>' />
                <br />
                firstname:
                <asp:TextBox ID="firstnameTextBox" runat="server" 
                    Text='<%# Bind("firstname") %>' />
                <br />
                lastname:
                <asp:TextBox ID="lastnameTextBox" runat="server" 
                    Text='<%# Bind("lastname") %>' />
                <br />
                portrait:
                <asp:TextBox ID="portraitTextBox" runat="server" 
                    Text='<%# Bind("portrait") %>' />
                <br />
                dateofbirth:
                <asp:TextBox ID="dateofbirthTextBox" runat="server" 
                    Text='<%# Bind("dateofbirth") %>' />
                <br />
                registrationdate:
                <asp:TextBox ID="registrationdateTextBox" runat="server" 
                    Text='<%# Bind("registrationdate") %>' />
                <br />
                gender:
                <asp:TextBox ID="genderTextBox" runat="server" Text='<%# Bind("gender") %>' />
                <br />
                <asp:Button ID="UpdateButton" runat="server" CommandName="Update" 
                    Text="Update" />
                <br />
                <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" 
                    Text="Cancel" />
                <br />
            </td>
        </EditItemTemplate>
        <EmptyDataTemplate>
            <table runat="server" 
                style="background-color: #FFFFFF;border-collapse: collapse;border-color: #999999;border-style:none;border-width:1px;">
                <tr>
                    <td>
                        No data was returned.</td>
                </tr>
            </table>
        </EmptyDataTemplate>
        <EmptyItemTemplate>
            <td runat="server" />
        </EmptyItemTemplate>
        <GroupTemplate>
            <tr ID="itemPlaceholderContainer" runat="server">
                <td ID="itemPlaceholder" runat="server">
                </td>
            </tr>
        </GroupTemplate>
        <InsertItemTemplate>
            <td runat="server" style="">
                dinerid:
                <asp:TextBox ID="dineridTextBox" runat="server" Text='<%# Bind("dinerid") %>' />
                <br />
                firstname:
                <asp:TextBox ID="firstnameTextBox" runat="server" 
                    Text='<%# Bind("firstname") %>' />
                <br />
                lastname:
                <asp:TextBox ID="lastnameTextBox" runat="server" 
                    Text='<%# Bind("lastname") %>' />
                <br />
                portrait:
                <asp:TextBox ID="portraitTextBox" runat="server" 
                    Text='<%# Bind("portrait") %>' />
                <br />
                dateofbirth:
                <asp:TextBox ID="dateofbirthTextBox" runat="server" 
                    Text='<%# Bind("dateofbirth") %>' />
                <br />
                registrationdate:
                <asp:TextBox ID="registrationdateTextBox" runat="server" 
                    Text='<%# Bind("registrationdate") %>' />
                <br />
                gender:
                <asp:TextBox ID="genderTextBox" runat="server" Text='<%# Bind("gender") %>' />
                <br />
                <asp:Button ID="InsertButton" runat="server" CommandName="Insert" 
                    Text="Insert" />
                <br />
                <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" 
                    Text="Clear" />
                <br />
            </td>
        </InsertItemTemplate>
        <ItemTemplate>

            <td runat="server" style="background-color:#DCDCDC;color:Black ;">

               <center><a href='profile.aspx?dinerid=<%# Eval("dinerid") %>'>
               <img src='<%# Eval("portrait") %>' alt="profile picture" style="width:200px;height:150px; margin:auto;"/></a></center><br/>
                <%# Eval("firstname") %> <%# Eval("lastname") %>
                <br />
                dateofbirth:
                <asp:Label ID="dateofbirthLabel" runat="server" 
                    Text='<%# Eval("dateofbirth") %>' />
                <br />
                registrationdate:
                <asp:Label ID="registrationdateLabel" runat="server" 
                    Text='<%# Eval("registrationdate") %>' />
                <br />
                gender:
                <asp:Label ID="genderLabel" runat="server" Text='<%# Eval("gender") %>' />
                <br />
            </td>
        </ItemTemplate>
        <LayoutTemplate>
            <table runat="server">
                <tr runat="server">
                    <td runat="server">
                        <table ID="groupPlaceholderContainer" runat="server" border="1" 
                            style="background-color: #FFFFFF;border-collapse: collapse;border-color: #999999;border-style:none;border-width:1px;font-family: Verdana, Arial, Helvetica, sans-serif;">
                            <tr ID="groupPlaceholder" runat="server">
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr runat="server">
                    <td runat="server" 
                        style="text-align: center;background-color: #CCCCCC;font-family: Verdana, Arial, Helvetica, sans-serif;color: #000000;">
                        <asp:DataPager ID="DataPager1" runat="server" PageSize="12">
                            <Fields>
                                <asp:NextPreviousPagerField ButtonType="Button" ShowFirstPageButton="True" 
                                    ShowLastPageButton="True" />
                            </Fields>
                        </asp:DataPager>
                    </td>
                </tr>
            </table>
        </LayoutTemplate>
        <SelectedItemTemplate>
            <td runat="server" 
                style="background-color:#008A8C;font-weight: bold;color: #FFFFFF;">
                dinerid:
                <asp:Label ID="dineridLabel" runat="server" Text='<%# Eval("dinerid") %>' />
                <br />
                firstname:
                <asp:Label ID="firstnameLabel" runat="server" Text='<%# Eval("firstname") %>' />
                <br />
                lastname:
                <asp:Label ID="lastnameLabel" runat="server" Text='<%# Eval("lastname") %>' />
                <br />
                portrait:
                <asp:Label ID="portraitLabel" runat="server" Text='<%# Eval("portrait") %>' />
                <br />
                dateofbirth:
                <asp:Label ID="dateofbirthLabel" runat="server" 
                    Text='<%# Eval("dateofbirth") %>' />
                <br />
                registrationdate:
                <asp:Label ID="registrationdateLabel" runat="server" 
                    Text='<%# Eval("registrationdate") %>' />
                <br />
                gender:
                <asp:Label ID="genderLabel" runat="server" Text='<%# Eval("gender") %>' />
                <br />
            </td>
        </SelectedItemTemplate>
    </asp:ListView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:mercedesbenzconnectionstring %>" 
        ProviderName="<%$ ConnectionStrings:mercedesbenzconnectionstring.ProviderName %>" 
        SelectCommand="SELECT [dinerid], [firstname], [lastname], [portrait], [dateofbirth], [registrationdate], [gender] FROM [userprofile]">
    </asp:SqlDataSource>
</asp:Content>

